export interface User {
  id?: number;
  username: string;
  email: string;

  password: string;
}

export interface Object {
  id: number;
  nickname: string;
  address: string;
  alarm_level: number;
  report_interval: number;
  fetch_timeout: number;
  resend_times: number;
  token: string;

  edges: {};
}

export interface Rule {
  id: number;
  nickname: string;
  alarm_level: number;
  range: string;
  min_alarm: number;
  max_alarm: number;
  metric: number;
  is_enable: string;

  object_id: number;
}

export interface Setting {
  id: number;
  nickname: string;
  length: number;
  method: string;
  metric: string;
  is_enable: string;

  object_id: number;
}

export interface Method {
  name: string;
}

export interface Metric {
  id: string;
  name: string;
}

export interface AlarmLv {
  value: number;
}

export type MethodsList = Method[];
export type MetricsList = Metric[];
export type AlarmLvList = AlarmLv[];

export interface Token {
  token: string;
}

export interface GetAlarmLogsReq {
  length: number;
  level?: number;
  is_pie?: string;
  object_id?: number;
}

export interface GetAlarmLogRsp {
  axis_x: string[];
  axis_y: number[];
  count: number;
}

export type GetAlarmCount = GetAlarmCountItem[];

export interface GetAlarmCountItem {
  name: string;
  value: number;
}

export interface GetAlarmRadarRsp {
  metric: string[];
  level_1: number[];
  level_2: number[];
  level_3: number[];
  max: number;
}
